<include file="Admin@default/public/header"/>
<div class="toptip">
    <div class="toptit">提示：</div>
    <p>若修改了伪静态规则，请修改服务器伪静态规则文件的对应规则</p>
</div>
<form action="{:U('page_add')}" method="post" name="form1" id="form1">
    <div class="toptit">基础设置</div>
    <div class="form_main width150">
        <div class="fl">页面类型：</div>
        <div class="fr txt">自定义页面</div>
        <div class="fl">调用ID：</div>
        <div class="fr">
            <input name="alias" type="text" maxlength="30" class="input_text_default middle" value="{$info['alias']}"/>
            <label class="no-fl-note">自定义页面调用名称不可以用 &quot;QS_&quot; 开头</label>
        </div>
        <div class="fl">页面名称：</div>
        <div class="fr">
            <input name="pname" type="text" maxlength="60" class="input_text_default" value=""/>
        </div>
        <div class="fl">导航关联标记：</div>
        <div class="fr">
            <input name="tag" type="text" maxlength="60" class="input_text_default" value=""/>
        </div>
        <div class="fl">链接优化：</div>
        <div class="fr">
            <div class="imgradio">
                <input name="url" type="hidden" value="0">
                <div class="radio select" data="0" title="原始链接">原始链接</div>
                <div class="radio" data="1" title="伪静态">伪静态</div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="fl">页面类型：</div>
        <div class="fr">
            <div class="imgradio">
                <input name="pagetpye" type="hidden" value="1">
                <div class="radio select" data="1" title="首页或频道首页" onclick="show_seo(1);">首页或频道首页</div>
                <div class="radio" data="2" title="信息列表页" onclick="show_seo(2);">信息列表页</div>
                <div class="radio" data="3" title="信息内容页" onclick="show_seo(3);">信息内容页</div>
                <div class="clear"></div>
            </div>
        </div>
        <notempty name="apply['Subsite']">
            <div class="fl">选择分站:</div>
            <qscms:subsite 列表名="subsite_list"/>
            <div class="fr">
                <div class="imgradio">
                    <input name="subsite_id" type="hidden" value="{$subsite_list[0]['s_id']}">
                    <if condition="$visitor['role_id'] eq 1">
                        <volist name="subsite_list" id="subsite">
                            <div class="radio <eq name='i' value='1'>select</eq>" data="{$subsite.s_id}" title="{$subsite.s_sitename}">{$subsite.s_sitename}</div>
                        </volist>
                        <else/>
                        <volist name="subsite_list" id="subsite">
                            <if condition="in_array($subsite['s_id'],$visitor['subsite'])">
                                <div class="radio <eq name='i' value='1'>select</eq>" data="{$subsite.s_id}" title="{$subsite.s_sitename}">{$subsite.s_sitename}</div>
                            </if>
                        </volist>
                    </if>
                    <div class="clear"></div>
                </div>
            </div>
        </notempty>
        <div class="clear"></div>
    </div>
    <div class="toptit">页面设置</div>
    <div class="form_main width150">
        <div class="fl">模块：</div>
        <div class="fr">
            <input name="module" type="text" class="input_text_default middle" value=""/>
            <label class="no-fl-note">(模块开头字母要大写)</label>
        </div>
        <div class="fl">控制器：</div>
        <div class="fr">
            <input name="controller" type="text" class="input_text_default middle" value=""/>
            <label class="no-fl-note">(控制器开头字母要大写)</label>
        </div>
        <div class="fl">方法：</div>
        <div class="fr">
            <input name="action" type="text" class="input_text_default middle" value=""/>
        </div>
        <div class="fl link_blue"><a href="javascript:isdisplay('caching_help')">(?)</a> 缓存时间：</div>
        <div class="fr">
            <input name="caching" type="text" class="input_text_default middle" value="0" maxlength="30"/>
            <label class="no-fl-note">(0为不缓存)</label>
        </div>
        <div id="caching_help" style="display:none">
            <div class="fl"></div>
            <div class="fr">
                <span style="color:#666666">
                    <strong style="color:#003399">缓存说明</strong><br/>缓存是当查询数据时，会把结果序列化后保存到文件中，以后同样的查询就不用查询数据库，而是从缓存中获得。这一改进使得程序速度得以太幅度提升。<br/>
                    缓存时间是缓存重新加载周期，周期越长，数据库的负荷越小，缓存周期假设为50秒，则每50秒刷新缓存一次。
                </span>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div id="seo">
        <div class="toptit">搜索引擎优化(SEO)</div>
        <div class="form_main width150">
            <div class="fl">可用标签：</div>
            <div class="fr txt">
                <div id="{site_name}" class="sellabel">网站名称</div>
                <div id="{site_domain}" class="sellabel">网站域名</div>
                <div class="clear"></div>
            </div>
            <div class="fl">title：</div>
            <div class="fr">
                <input name="title" type="text" class="input_text_default" id="labtitle" value=""/>
            </div>
            <div class="fl">keywords：</div>
            <div class="fr">
                <textarea name="keywords" class="input_text_default" id="labkeywords" style="height:80px; line-height: 180%;"></textarea>
            </div>
            <div class="fl">description：</div>
            <div class="fr">
                <textarea name="description" class="input_text_default" id="labdescription" style="height:80px; line-height: 180%;"></textarea>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    <div class="form_main width150">
        <div class="fl"></div>
        <div class="fr">
            <input type="submit" class="admin_submit" value="添加"/>
            <input type="button" class="admin_submit" value="返回" onclick="window.location='{:U('Admin/page')}'"/>
        </div>
        <div class="clear"></div>
    </div>
</form>
</div>
<include file="Admin@default/public/footer"/>
<script type="text/javascript" src="__ADMINPUBLIC__/js/jquery.caretInsert.js"></script>
<script language="JavaScript" type="text/javascript">
    // 页面类型
    /*function show_seo(showid)
    {
        if (showid!=3)
        {
            document.getElementById('seo').style.display="";
        } else {
            document.getElementById('seo').style.display="none";
        }
    }*/
    // 缓存时间提示
    function isdisplay(i) {
        if (document.getElementById(i).style.display == "") {
            document.getElementById(i).style.display = "none";
        } else {
            document.getElementById(i).style.display = "";
        }
    }
    (function ($) {
        $(".sellabel").hover(function () {
            $(this).css("background-color", "#ffffff");
        }, function () {
            $(this).css("background-color", "#F4FAFF");
        });
        $("#labtitle").unbind().focus(function () {
            $('#labtitle').setCaret();
            $('.sellabel').unbind("click").click(function () {
                $('#labtitle').insertAtCaret($(this).attr("id"));
            });
        });
        $("#labkeywords").unbind().focus(function () {
            $('#labkeywords').setCaret();
            $('.sellabel').unbind("click").click(function () {
                $('#labkeywords').insertAtCaret($(this).attr("id"));
            });
        });
        $("#labdescription").unbind().focus(function () {
            $('#labdescription').setCaret();
            $('.sellabel').unbind("click").click(function () {
                $('#labdescription').insertAtCaret($(this).attr("id"));
            });
        });
    })($);
</script>
</body>
</html>